home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / btest.z / btest
Encoding:
Text File  |  1998-10-30  |  1.9 KB  |  61 lines

  1. BTEST(3I)                                              Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      BBTTEESSTT - Tests a bit of an integer value
  6.  
  7. SSYYNNOOPPSSIISS
  8.      BBTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The BBTTEESSTT intrinsic function tests a bit of an integer value.  It
  18.      accepts the following arguments:
  19.  
  20.      _i         Must be of type integer.
  21.  
  22.      _p_o_s       Must be of type integer.  It must be nonnegative and be less
  23.                than BBIITT__SSIIZZEE((_i)).
  24.  
  25.      BBTTEESSTT is an elemental function.  The name of this intrinsic cannot be
  26.      passed as an argument.
  27.  
  28. RREETTUURRNN VVAALLUUEESS
  29.      The result is of type default logical.  The result has the value TTRRUUEE
  30.      if bit _p_o_s of _i has the value 1.  It has the value FFAALLSSEE if bit _p_o_s of
  31.      _i has the value 0.  The bit model defines the interpretation of an
  32.      integer value as a sequence of bits.  This model is described in the
  33.      MMOODDEELLSS(3I) man page.
  34.  
  35. EEXXAAMMPPLLEESS
  36.      Example 1:  BBTTEESSTT((88,, 33)) has the value TTRRUUEE.
  37.  
  38.      Example 2:  BBTTEESSTT((88__SSHHOORRTT,, 33)) has the value TTRRUUEE.
  39.  
  40.      Example 3:  Assume that AA has the following value:
  41.  
  42.         | 1 2 |
  43.         | 3 4 |
  44.  
  45.      The value of BBTTEESSTT((AA,, 22)) is as follows:
  46.  
  47.         | false  false |
  48.         | false  true  |
  49.  
  50.      The value of BBTTEESSTT((22,, AA)) is as follows:
  51.  
  52.         | true   false |
  53.         | false  false |
  54.  
  55. SSEEEE AALLSSOO
  56.      MMOODDEELLSS(3I)
  57.  
  58.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  59.      printed version of this man page.
  60.  
  61.